package com.gtw.modules.api.service.impl;

import com.baomidou.mybatisplus.plugins.Page;
import com.gtw.modules.api.service.TbEnergyvalueNotesService;
import com.gtw.modules.dao.TbEnergyvalueNotesDao;
import com.gtw.modules.entity.TbEnergyvalueNotes;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;


/**
 * @author wuye
 */
@Service("energyvalueNotesservice")
public class TbEnergyvalueNotesServiceImpl implements TbEnergyvalueNotesService {
    @Autowired
    private TbEnergyvalueNotesDao energyvalueNotesDao;

    @Override
    public TbEnergyvalueNotes queryObject(Integer id) {
        return energyvalueNotesDao.selectByPrimaryKey(id);
    }


    @Override
    public void save(TbEnergyvalueNotes energyvalueNotes) {
        energyvalueNotesDao.insert(energyvalueNotes);
    }

    @Override
    public void update(TbEnergyvalueNotes energyvalueNotes) {
        energyvalueNotesDao.updateByPrimaryKey(energyvalueNotes);
    }

    @Override
    public void delete(Integer id) {
        energyvalueNotesDao.deleteByPrimaryKey(id);
    }

    @Override
    public Page<TbEnergyvalueNotes> queryPageList(Page<TbEnergyvalueNotes> pageUtil, Map<String, Object> map) {
        pageUtil.setRecords(energyvalueNotesDao.queryPageList(pageUtil, map));
        return pageUtil;
    }

}
